package com.tarim.wheat.mapper;

import com.tarim.wheat.model.User;
import com.tarim.wheat.vo.Criteria;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component("UserMapper")
public interface UserMapper {
    /**
     * 注册
     * @param record
     * @return
     */
    int insert(User record);

    User selectForLogin(User record);

    Long selectByUserName(User record);

    Long selectByConditionCount(Criteria criteria);
    List<User> selectByCondition(Criteria criteria);

    int updateDr(User user);

}